Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docker: fix mamba libarchive.so.13 not found error #245

Merged
merged 1 commit into from
Jul 7, 2022

Conversation

tlvu
Copy link
Collaborator

@tlvu tlvu commented Jul 7, 2022

Apparently the libarchive from the defaults channel is broken so we
reversed the mamba install channel priority so conda-forge channel has
higher priority than defaults so libarchive comes from conda-forge
instead of defaults.

The side-effect is the conda flavor (the whole base env) is also from
conda-forge. The upcoming Jupyter env has the same problem with the
same fix and all subsequent installs works fine so this side-effect
seems acceptable.

To fix this error during docker build:
https://hub.docker.com/repository/registry-1.docker.io/birdhouse/finch/builds/d18843f1-8d55-4b5b-922f-975bbba9c8f1

RUN conda config --add channels conda-forge && mamba env create -n finch -f environment.yml && mamba install -c conda-forge -n finch gunicorn psycopg2 && rm -rf /opt/conda/pkgs/*
  Traceback (most recent call last):
  File "/opt/conda/bin/mamba", line 7, in <module>
  from mamba.mamba import main
  File "/opt/conda/lib/python3.9/site-packages/mamba/mamba.py", line 49, in <module>
  import libmambapy as api
  File "/opt/conda/lib/python3.9/site-packages/libmambapy/__init__.py", line 7, in <module>
  raise e
  File "/opt/conda/lib/python3.9/site-packages/libmambapy/__init__.py", line 4, in <module>
  from libmambapy.bindings import * # noqa: F401,F403
  ImportError: libarchive.so.13: cannot open shared object file: No such file or directory

@aulemahal Once this PR is merged, you'll need to tag and release another Finch since the v0.9.0 was never out on DockerHub due to this error.

Apparently the `libarchive` from the `defaults` channel is broken so we
reversed the mamba install channel priority so `conda-forge` channel has
higher priority than `defaults` so `libarchive` comes from `conda-forge`
instead of `defaults`.

The side-effect is the conda flavor (the whole `base` env) is also from
`conda-forge`.  The upcoming Jupyter env has the same problem with the
same fix and all subsequent installs works fine so this side-effect
seems acceptable.

To fix this error during docker build:
https://hub.docker.com/repository/registry-1.docker.io/birdhouse/finch/builds/d18843f1-8d55-4b5b-922f-975bbba9c8f1
```
RUN conda config --add channels conda-forge && mamba env create -n finch -f environment.yml && mamba install -c conda-forge -n finch gunicorn psycopg2 && rm -rf /opt/conda/pkgs/*
  Traceback (most recent call last):
  File "/opt/conda/bin/mamba", line 7, in <module>
  from mamba.mamba import main
  File "/opt/conda/lib/python3.9/site-packages/mamba/mamba.py", line 49, in <module>
  import libmambapy as api
  File "/opt/conda/lib/python3.9/site-packages/libmambapy/__init__.py", line 7, in <module>
  raise e
  File "/opt/conda/lib/python3.9/site-packages/libmambapy/__init__.py", line 4, in <module>
  from libmambapy.bindings import * # noqa: F401,F403
  ImportError: libarchive.so.13: cannot open shared object file: No such file or directory
```
@tlvu tlvu requested a review from aulemahal July 7, 2022 16:06
@Zeitsperre Zeitsperre self-requested a review July 7, 2022 16:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants